package com.chance.cc.crawler.development.command.publish.weibo;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.weibo.WeiboPostCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.job.domain.weibo.WeiboSearchKwCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.job.domain.weibo.WeiboTieCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.job.domain.weibo.subscribe.WeiboApiSubscribeUserIdCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.job.domain.weibo.subscribe.WeiboApiSubscribeUserIdInteractionCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.job.domain.weibo.subscribe.WeiboApiSubscribeUserIdInteractionSimpleCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.trigger.domain.weibo.WeiboPostScheduleTrigger;
import com.chance.cc.crawler.development.command.trigger.domain.weibo.WeiboSearchKwScheduleTrigger;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2020/12/30 13:52
 * @Description
 *      微博
 **/
public class WeiboPublishCrawlerJob {

    public static void main(String[] args) {
        publishCrawlerJob();
    }

    public static void publishCrawlerJob(){
//        selfSearchKw();
       // selfPost();
        selfTie();
//        subscribeUserId();
//        subscribeUserIdInteraction();
//        subscribeUserIdInteractionSimple();
//        WeiboCrawlerScript.publishCrawlerNodeScript();
    }

    private static void selfSearchKw(){
        CrawlerJob crawlerJob = WeiboSearchKwCrawlerScheduleJob.publishCrawlerScheduleJobInfo();
        WeiboSearchKwScheduleTrigger.publishScheduleTriggerInfo(crawlerJob.generateCrawlerKey(), crawlerJob.generateCrawlerTriggerKey());
    }
    private static void selfTie(){
        CrawlerJob weiboPostJob = WeiboTieCrawlerScheduleJob.publishCrawlerScheduleJobInfo();
        WeiboPostScheduleTrigger.publishScheduleTriggerInfo(weiboPostJob.generateCrawlerKey(),weiboPostJob.generateCrawlerTriggerKey());
    }
    private static void selfPost(){
        CrawlerJob weiboPostJob = WeiboPostCrawlerScheduleJob.publishCrawlerScheduleJobInfo();
        WeiboPostScheduleTrigger.publishScheduleTriggerInfo(weiboPostJob.generateCrawlerKey(),weiboPostJob.generateCrawlerTriggerKey());
    }


    private static void subscribeUserId(){
        CrawlerJob weiboPostJob = WeiboApiSubscribeUserIdCrawlerScheduleJob.publishApiSubscribeDataCrawlerScheduleJobInfo();
        WeiboPostScheduleTrigger.publishApiScheduleTriggerInfo(weiboPostJob.generateCrawlerKey(),weiboPostJob.generateCrawlerTriggerKey());
    }


    private static void subscribeUserIdInteraction(){
        CrawlerJob weiboPostJob = WeiboApiSubscribeUserIdInteractionCrawlerScheduleJob.publishApiSubscribeDataCrawlerScheduleJobInfo();
        WeiboPostScheduleTrigger.publishApiJInteractionScheduleTriggerInfo(weiboPostJob.generateCrawlerKey(),weiboPostJob.generateCrawlerTriggerKey());
    }

    private static void subscribeUserIdInteractionSimple(){
        CrawlerJob weiboPostJob = WeiboApiSubscribeUserIdInteractionSimpleCrawlerScheduleJob.publishApiSubscribeDataCrawlerScheduleJobInfo();
        WeiboPostScheduleTrigger.publishScheduleTriggerInfo(weiboPostJob.generateCrawlerKey(),weiboPostJob.generateCrawlerTriggerKey());
    }


}
